package com.lamda.zhekou.dao;

import java.util.List;

public interface GenericDao<T> {


    public static final class QueryParameterUtil {
        public static final String LIKE = " like ";
        public static final String EQUAL = " = ";
        public static final String NOT_EQUAL = " != ";


    }

    T persist(T entity);

    T update(T entity);

    void delete(Long id);

    T findById(Long id);

    List<T> findAll();

    /**
     * 统计总的数据记录数
     * @return
     */
    Long selectCount();

    T findByParameterAndSingleResult(String parameterKey, String parameterValue, String queryMethod);


}